import request from '@/utils/request'

// ------时段相关--------
// 获取时段列表数据
export function get_period_list(token, data) {
  return request({
    url: 'access/period/get_select',
    method: 'post',
    params: { token },
    data
  })
}
// 获取单条时段数据
export function get_period_info(token, data) {
  return request({
    url: 'access/period/info',
    method: 'post',
    params: { token },
    data
  })
}
// 创建新的时段
export function add_period(token, data) {
  return request({
    url: 'access/period/add',
    method: 'post',
    params: { token },
    data
  })
}
// 编辑时段
export function edit_period(token, data) {
  return request({
    url: 'access/period/edit',
    method: 'post',
    params: { token },
    data
  })
}
// 删除时段
export function delete_period(token, data) {
  return request({
    url: 'access/period/delete',
    method: 'post',
    params: { token },
    data
  })
}
// ---------时段结束------------

// ------周末设置相关--------
// 获取周末列表数据
export function get_weekly_list(token, data) {
  return request({
    url: 'access/weekly/get_select',
    method: 'post',
    params: { token },
    data
  })
}
// 获取单条周末数据
export function get_weekly_info(token, data) {
  return request({
    url: 'access/weekly/info',
    method: 'post',
    params: { token },
    data
  })
}
// 创建新的周末
export function add_weekly(token, data) {
  return request({
    url: 'access/weekly/add',
    method: 'post',
    params: { token },
    data
  })
}
// 编辑周末
export function edit_weekly(token, data) {
  return request({
    url: 'access/weekly/edit',
    method: 'post',
    params: { token },
    data
  })
}
// 删除周末
export function delete_weekly(token, data) {
  return request({
    url: 'access/weekly/delete',
    method: 'post',
    params: { token },
    data
  })
}
// ---------时段结束-------------

// ------班次相关--------
// 获取班次列表数据
export function get_schedule_list(token, data) {
  return request({
    url: 'access/schedule/get_list',
    method: 'post',
    params: { token },
    data
  })
}
// 获取单条班次数据
export function get_schedule_info(token, data) {
  return request({
    url: 'access/schedule/info',
    method: 'post',
    params: { token },
    data
  })
}
// 创建新的班次
export function add_schedule(token, data) {
  return request({
    url: 'access/schedule/add',
    method: 'post',
    params: { token },
    data
  })
}
// 编辑班次
export function edit_schedule(token, data) {
  return request({
    url: 'access/schedule/edit',
    method: 'post',
    params: { token },
    data
  })
}
// 删除班次
export function delete_schedule(token, data) {
  return request({
    url: 'access/schedule/delete',
    method: 'post',
    params: { token },
    data
  })
}
// ---------时段结束-------------

// 获取员工列表
export function getStaffList(token, data) {
  return request({
    url: 'organization/employee/get_select',
    method: 'post',
    params: { token },
    data
  })
}

